package cate.game.power;

import cate.game.attr.FightAttr;
import cate.game.attr.PowerAttrPart;
import cate.game.role.Role;

public class MagicContractPowerFactor {
    /**
     * 世界之树聚灵树属性
     */
    public FightAttr additionAttr;

    public MagicContractPowerFactor(Role role) {
        if (role == null) {
            return;
        }
        this.additionAttr = role.getRes().magicContract.addAttr();
    }

    public PowerAttrPart buildHeroPart() {
        PowerAttrPart part = new PowerAttrPart();
        if (additionAttr != null) {
            part.attr.add(additionAttr);
        }
        return part;
    }
}
